<?php
/**
 * The following variables are available in this template:
 * - $this: the BootCrudCode object
 */
/** @var AweCrudCode $this */
?>
<?php echo "<?php\n" ?>
/** @var <?php echo $this->controllerClass; ?> $this */
/** @var <?php echo $this->modelClass; ?> $model */
<?php
$label = $this->pluralize($this->class2name($this->modelClass));
?>
/** 
* Permite administrar una lista del modelo <?php echo $this->modelClass; ?>
*/
$this->menu=array(
array('label' =>Yii::t('AweCrud.app', 'Create'),'icon'=>'list-alt', 'url' => array('create')),
);
?>
<div class="row-fluid">
    <div class="span10 ">
        <?php echo "<?php \n" ?>
        $this->beginWidget('zii.widgets.CPortlet', array(
        'title' => Yii::t('AweCrud.app', 'Manage'). ' '. <?php echo "$this->modelClass::label(2)" ?>,
        ));
        <?php echo "?>\n" ?>

        <div class="well">
            <?php echo "    <?php"; ?> 
            $this->widget('bootstrap.widgets.TbGridView',array(
            'id' => '<?php echo $this->class2id($this->modelClass); ?>-grid',
            'type' => 'striped condensed',
            'dataProvider' => $model->search(),
            'filter' => $model,
            'columns' => array(
            <?php
            $count = 0;
            foreach ($this->tableSchema->columns as $column) {
                if ($column->isPrimaryKey || in_array($column->name, $this->descriptionFields)) {
                    continue;
                }
                if (++$count == 7):
                    ?>
                    /*<?php echo "\n" ?>
                <?php endif; ?>
                <?php echo $this->generateGridViewColumn($this->modelClass, $column) . ",\n" ?>
                <?php
            }
            if ($count >= 7):
                ?>
                */<?php echo "\n" ?>
            <?php endif; ?>
            array(
            'class' => 'bootstrap.widgets.TbButtonColumn',
            'template' => '{view} {update}{delete}'
            ),
            ),
            )); ?>
            <?php echo "<?php \$this->endWidget(); ?>\n" ?>
        </div>
    </div>

    <div class="span2">
        <?php echo "<?php\n" ?>
        $this->beginWidget('zii.widgets.CPortlet', array(
        'title' => Yii::t('AweCrud.app', 'Operaciones'),
        ));
        $this->widget('zii.widgets.CMenu', array(
        'items'=>$this->menu,
        'htmlOptions' =>array('class' =>'operations'),
        ));
        <?php echo "?>\n" ?>
        <?php echo "<?php \$this->endWidget(); ?>\n" ?>
    </div>
</div>